﻿using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;

namespace ILoli.Net
{
    [Serializable]
    public class SocketException : System.Exception
    {
        int errorCode = 0;

        /**********************************************************************
         * Constructors.
         * *******************************************************************/
        public SocketException()
        {

        }

        public SocketException(string Message)
            : base(Message)
        {

        }

        public SocketException(SerializationInfo SerializationInfo, StreamingContext StreamingContext)
            : base(SerializationInfo, StreamingContext)
        {

        }

        public SocketException(string Message, Exception InnerException)
            : base(Message, InnerException)
        {

        }

        public SocketException(int ErrorCode)
        {
            errorCode = ErrorCode;
        }

        public SocketException(int ErrorCode, string Message)
            : base(Message)
        {
            errorCode = ErrorCode;
        }

        /**********************************************************************
         * Attributes.
         * *******************************************************************/
        public int ErrorCode
        {
            get
            {
                return errorCode;
            }
        }
    }
}
